import req from "@/utils/request.js";
import base from "@/api/base.js";

const api = {
    /*登录*/
    postLogin(data) {
        return req.post(base.login, data)
    },
    /*查询所有文章*/
    getArt(data) {
        return req.get(base.getArt, data)
    },
    /*添加文章*/
    addArt(data) {
        return req.post(base.addArt, data)
    },
    /*登录code解析*/
    oauth2(data) {
        return req.get(base.oauth, data)
    },
    /*更新文章*/
    upArt(data) {
        return req.post(base.upArt, data)
    },
    /*删除文章*/
    delArt(data) {
        return req.post(base.delArt, data)
    },
}

export default api 